<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Map extends Model {
	protected $table = "activityables";

	protected $fillable = [
		'business_id', 'activity_id', 'type_id',
	];

	public function business() {
		return $this->belongsTo(Business::class);
	}

	public function activity() {
		return $this->belongsTo(Activity::class);
	}

	public function type() {
		return $this->belongsTo(Type::class);
	}

	public function orders() {
		return $this->hasMany(Order::class, 'map_id');
	}
}
